<template>
	<view style="height: 100vh; background-color: gainsboro;">
		<view class="text">
			{{tableList.typeStr}}
			<view class="zanwu" v-for="(item,index) in tableList" :key="index">
				<view class="list-title">
					<view class="title1">
						{{item.typeStr}}
					</view>
					<view class="title">
						{{item.dateAdd}}
					</view>
				
				</view>
	            <view class="list-score">
						{{item.score}}
					</view>
			
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tableList:[]
			}
		},
		mounted() {
			this.getList()
		},
		methods: {
		
			getList(){
				let that = this;
				uni.request({
					url:"https://api.it120.cc/xiaochengxu/score/logs?token=a8d38f3f-31fd-44aa-90c4-7d5b2e5d8b2a",
					method:"POST",
					dataType: "json",
					data:{
						token:that.token
					},
					header:{
						'Content-Type': 'application/x-www-form-urlencoded'
					},
					success: function(res) {
						that.tableList =res.data.data.result
						console.log(that.tableList);
					}
				})
			},
			onLoad() {
			   let that =this
			   uni.getStorage({
			     key: 'token',
			     success: function(res) {
			      
			      console.log(res.data);
			      that.token = res.data
			     }
			    })
			   
			
			  },
		}
	}
</script>

<style scoped lang="scss">
.text{
	width: 100%;
	height: 40vh;
	display: flex;
	flex-direction: column;
	.bg{
		height: 80%;
		width: 100%;
		background-image: url(../../static/eee.png);
		background-repeat: no-repeat;
		background-position: center center;
		background-size: 40%;
		
	}
	.zanwu{
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 8vh;
		width: 100vw;
		background-color: #fff;
		font-size: 3.73vw;
		color: #969799;
		.list-title{
			margin-left: 5%;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: center;
			.title1{
				color: black;
			}
		}
		.list-score{
		margin-right: 5%;
		}
	}
}
</style>
